<!-- disqus 评论 for opengit.org -->
<div id="comments" class="box-shadow">
<div id="disqus_thread"></div>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<div class='clear'></div>
</div>

<script type="text/javascript">
var disqus_shortname = 'opengit'; 
var disqus = {
    embed:function(){
        var dsq = document.createElement('script'); 
        dsq.type = 'text/javascript';
        dsq.async = true;
        dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    },
    count:function(){
        var s = document.createElement('script'); 
        s.async = true;
        s.type = 'text/javascript';
        s.src = 'http://' + disqus_shortname + '.disqus.com/count.js';
        (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
    }
};
$(function(){
	//disqus.count();
	var comment = false;
	if(window.screen.height > document.height){
		disqus.embed();
		comment = true;
	}else{
		$(document).bind("scroll", function() {
			if ($(window).height() + $(document).scrollTop() + 1000 > $(document).height() && !comment) {
				disqus.embed(); 
				comment = true;
			}
		});
	}
});
</script>
